package com.soccertgc.data
{
	import com.soccertgc.data.enum.Enum;
	
	import flash.utils.getQualifiedClassName;

	public class EnumTest01 extends Enum
	{
		
		// -------------------------------------------------------------------------------
		// CONSTANTS
		// -------------------------------------------------------------------------------		
		
		public static const 	ITEM01:EnumTest01		= new EnumTest01(1, "ITEM01",	"itm01");
		public static const 	ITEM02:EnumTest01		= new EnumTest01(2, "ITEM02", 	"itm02");
		public static const 	ITEM03:EnumTest01		= new EnumTest01(3, "ITEM02", 	"itm03");
		
		
		private static const 	REFERENCE:EnumTest01	= new EnumTest01(-1, "", "");
		
		// -------------------------------------------------------------------------------
		// STATIC CONSTRUCTOR
		// -------------------------------------------------------------------------------
		
		// Fake static constructor
		{
			// Init!
			init([ITEM01, ITEM02, ITEM03]);
		}
		
		// -------------------------------------------------------------------------------
		// CONSTRUCTOR
		// -------------------------------------------------------------------------------		
		
		public function EnumTest01(id:int, name:String, description:String)
		{
			super(id, name, description);
		}
		
		public static function list():Array
		{
			return Enum.list(getQualifiedClassName(REFERENCE));
		}
		
		public static function names():Array
		{
			return Enum.names(REFERENCE.UID);
		}
		
		public static function getById(id:int):EnumTest01
		{
			return Enum.getById(REFERENCE.UID, id) as EnumTest01;
		}
		
		public static function getByName(name:String):EnumTest01
		{
			return Enum.getByName(REFERENCE.UID, name) as EnumTest01;
		}
		
		public static function getByDescription(name:String):EnumTest01
		{
			return Enum.getByDescription(REFERENCE.UID, name) as EnumTest01;
		}		
		
	}
}